import { defineStore } from "pinia";

// 组合式
export const useCounterStore = defineStore("counter", () => {
  const count = ref(0);
  // 定义其他状态和方法
  const increment = () => {
    count.value++;
  };

  const double = computed(() => count.value * 2);

  return {
    count,
    increment,
    double,
  };
});
